This page last changed on Oct 20, 2006 by cholmes.
In this section you will:
Install a Java SDK
| Java 1.5
GeoServer is a Java 1.4 application. It is possible to use other versions of java, but 1.4 is recommended for development so 1.5 features don't creep in. Here are some notes for Java 1.5 users. |
Installation
In this section you will:
- Download and Install a Java 1.4 SDK
- Update your Environment Variables to point to the new Java installation.
Download
Download the appropriate JDK package for your platform from sun.
Java 2 SDK, Standard Edition 1.4.2_12
|
It is possbile to work with GeoServer using a non-Sun JDK. Feel free to do so at your own risk. If you run into problems using a non-Sun JDK, support from the GeoServer community will be limited. |
Windows
Choose the Windows Offline Installation option.
Linux
Choose the self-extracting file option. Or if your distribution supports RPM's, select the RPM in self-extracing file option.
Install
Windows Installer
- Run the Windows Installer downloaded in the previous section.
- Navigate through the installer. The rest of this section assumes all defaults have been accepted.
- Optional: On the Custom Setup screen, disable the Public Java Runtime Environment option.
- Done, Congradulations
Linux (Binary)
Depending on your choice of installation location, you may require root access perform the installation.
- Change directory to the location in which you want the JDK installed. Example: /usr/java.
- Execute the command:
[/usr/java]% sh j2sdk-1_4_2_12-linux-i586.bin
- Using the Space Bar, navigate to the end of the License Agreement, and accept by typing 'yes'.
For inquiries please contact: Sun Microsystems, Inc., 4150
Network Circle, Santa Clara, California 95054, U.S.A.
(LFI#129530/Form ID#011801)
Do you agree to the above license terms? [yes or no]
yes
Linux (RPM)
Installation must be performed by a user who has the appropriate permissions to install RPM's.
- Execute the command:
[/home/user]% sh j2sdk-1.4.2_12-linux-i586.rpm.bin
- Using the Space Bar, navigate to the end of the License Agreement, and accept by typing 'yes'.
- Execute the command:
[/home/user]% rpm -ivh j2sdk-1.4.2_12-linux-i586.rpm
Environment
It is important to add the JAVA_HOME properly in order for maven (our build system) to function correctly.
Windows
(some of this may be done automatically)
- Right-click the My Computer icon located on your Desktop or Start Menu, and select Properties.
- On the Properties Dialog, select the Advanced tab, and click the Environment Variables... button.
- Set the JAVA_HOME variable to point to your JDK installation.
- Update the PATH variable to include %JAVA_HOME%/bin.
Linux
Execute the following commands to update your environment (assuming you are using a bash shell).
export JAVA_HOME=/usr/java/j2sdk-1.4.2_11
export PATH=$PATH:$JAVA_HOME/bin
The above commands should be added to your profile (as in your .bashrc) in order to persist.
|